const mongoose = require("mongoose");


function connectMongodb(config) {
	var url = "mongodb://"
		+ config.database.host + ":"
		+ config.database.port + "/"
		+ config.database.db_name;
	mongoose.connect(url);
}

module.exports  = {
	connect : connectMongodb,
	model : {
		userModel : require("../entity/userModel"),
		albumModel : require("../entity/albumModel"),
		musicModel : require("../entity/musicModel")
	}
};